<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id="app"></div>
    <script src="react.js"></script>
    <script src="react-dom.js"></script>
    <script src="browser.min.js"></script>
    <script>
        //利用map函数批量处理数组元素
    const numbers = [2,4,5,6,8];
    const double = numbers.map((numbers)=>numbers*2)
    console.log(numbers);
    console.log(double);

    //渲染多个组件
    const arr = [1,2,3,4,5,6];
    const listItems = arr.map((arr)=>
    <li>{arr}</li>
    );
    
    ReactDOM.render(
        <ul>{listItems}</ul>,
        document.getElementById("app")
    );
    </script>
</body>
</html>